package com.boang.fz;

/*
    @author:sa
    @date:2024/11/18 11:26
*/
public class Student {
    public String name;
    private int age;
    String sex;
   protected  double score;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age>=1&&age<120){
            this.age = age;
        }else {
            System.out.println("无效年龄");
        }
    }

    public Student() {

    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
}